package com.ymk.service.impl;

import com.ymk.base.mybatis.DaoRouter;
import com.ymk.base.mybatis.Pagination;
import com.ymk.bo.work.WorkCollectBO;
import com.ymk.service.IWorkCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 岗位收藏表 服务实现类
 * </p>
 *
 * @author 莫参商
 * @since 2023-08-14
 */
@Service
public class WorkCollectService implements IWorkCollectService {

    @Override
    public WorkCollectBO get(Map param) {
    return this.daoRouter.queryForObject("WorkCollect.loadWorkCollect",param);
    }

    @Override
    public List<WorkCollectBO> list(Map param) {
        return this.daoRouter.query("WorkCollect.loadWorkCollect",param);
    }

    @Override
    public List<WorkCollectBO> listForPage(Pagination pagination) {
        return this.daoRouter.query("WorkCollect.loadWorkCollectForPage",pagination);
    }

    @Override
    public void post(WorkCollectBO param) {
        this.daoRouter.insert("AWorkCollect.insertWorkCollect",param);
    }

    @Override
    public void update(WorkCollectBO param) {
        this.daoRouter.update("AWorkCollect.updateWorkCollect",param);
    }

    @Override
    public void del(WorkCollectBO param) {
        this.daoRouter.update("AWorkCollect.delWorkCollect",param);
    }

    @Autowired
    private DaoRouter daoRouter;

}
